package com.yuhanginfo.modules.web.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.yuhanginfo.common.persistence.Page;
import com.yuhanginfo.common.service.WebCrudService;
import com.yuhanginfo.modules.web.dao.WebCarouselDao;
import com.yuhanginfo.modules.web.entity.WebCarousel;

/**
 * 轮播图Service
 * @author lvls
 * @version 2017-10-09
 */
@Service
@Transactional(readOnly = true)
public class WebCarouselService extends WebCrudService<WebCarouselDao, WebCarousel> {

	@Autowired
	private WebCarouselDao webCarouselDao;
	
	public WebCarousel get(String id) {
		return super.get(id);
	}
	
	public List<WebCarousel> findList(WebCarousel carousel) {
		return super.findList(carousel);
	}
	
	public Page<WebCarousel> findPage(Page<WebCarousel> page, WebCarousel carousel) {
		return super.findPage(page, carousel);
	}
	
	@Transactional(readOnly = false)
	public void save(WebCarousel carousel) {
		super.save(carousel);
	}
	
	@Transactional(readOnly = false)
	public void delete(WebCarousel carousel) {
		super.delete(carousel);
	}

	public List<WebCarousel> getAllCarousel() {
		return webCarouselDao.getAllCarousel();
	}
}